<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006-2016 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: july <liu21st@gmail.com>
// +----------------------------------------------------------------------

// 应用公共文件
header("Content-type:text/html; charset=UTF-8");
/*
 * 响应成功示例
 */
function lsd_success($result='',$loan_mode='',$user_id='',$status='1', $message='success'){
     $reuslt=array(
        'status'=>$status,
        'message'=>$message,
        'response'=>[
            'result'=>$result,
            'loan_mode'=>$loan_mode,
            'user_id'=>$user_id,
        ],
    );
    exit(json_encode($reuslt,JSON_UNESCAPED_UNICODE));
}
/*
 * 响应失败示例
 */
function lsd_error($remark='',$result='10001',$status='2', $message='error'){
    $reuslt=array(
        'status'=>$status,
        'message'=>$message,
        'response'=>[
            'result'=>$result,
            'remark'=>$remark,
        ],
    );
    exit(json_encode($reuslt,JSON_UNESCAPED_UNICODE));
}